1. Field of the Invention
The present invention relates to a flash memory, a flash memory access method and apparatus. More particularly, the present invention relates to a flash memory, a flash memory access method and apparatus capable of allowing memory access and error block recovery to be made more efficiently by referring to a predetermined mapping table representing a physical address and status of a data block which is located in a block allocation map (hereinafter called ‘map block’) of the flash memory.
2. Description of the Prior Art
In general, flash memory has advantages of both RAM (random access memory) to and from which data is freely written and erased, and ROM (read only memory) capable of preserving stored data without the application of power. With these advantages, the flash memory has recently been widely used in storage media of portable electronic apparatus such as digital cameras, PDAs and MP3 players.
In such a flash memory, data stored at a specific location can be randomly accessed in the same manner as existing RAMs, nonvolatile storage devices, magnetic devices, or the like. However, when data are to be modified or erased, they are accessed in a block unit contrary to existing storage devices.
That is, if specific data stored in a flash memory are to be modified or erased, a data block containing the specific data should be removed and then the data should be written again. For example, it corresponds to a case where instead of modifying specific letters or characters one by one, a word containing the specific letters or characters is removed as a whole by pressing a ‘delete’ key and then it is entered again.
Among terms used herein, a ‘block’ represents a unit that can be erased at a time from a flash memory through a single erase operation, and a ‘page’ represents a size of data that can be read or written upon read/write operations.
A ‘flash translation layer’ (hereinafter, referred to as ‘FTL’) is software that allows a flash memory to be used as a block device. Generally, the FTL is a method for efficiently managing the flash memory and supports a block (or sector) re-mapping scheme.
A block (or sector) re-mapping scheme functions to manage mapping information on specific data between LBN and PBN so that even though a physical block number (hereinafter, referred to as ‘PBN’) of the data written onto a flash memory is changed due to modification or erasure of the data, the data written into the flash memory can be accessed using the same logical block number (hereinafter, referred to as ‘LBN’).
However, since the lifetime of a memory cell in a flash memory is not more than about 100,000 write cycles, the number of partial writes is limited.
Further, in a case where the supply of power is stopped during a write operation, there was a problem in that user's data being written or data for use in the remapping may be lost.
In the prior art, therefore, memory status information is written into the block and is then properly modified whenever the write operation is performed. In such a case, a storage space for storing the mapping information and time for managing the mapping information are required. Thus, there is a need for a more efficient processing method.
For example, in an NOR scheme FTL or a NAND scheme FTL of M-Systems currently commercialized, modified mapping information must be written using an additional replacement virtual page map (hereinafter, referred to as ‘replacement VPM’) whenever a write operation is performed. In such a case, there is a problem in that about 50% of a total flash memory is consumed since the replacement VPM must be employed in every data block.
Korean Patent No. 10-0319598 proposed for solving these problems in the prior art, which is entitled “Method and Apparatus for Accessing Flash Memory Array”, discloses a technology capable of improving memory access efficiency by dividing the memory into block units and locating a lookup table at every divided block. However, there is a problem in that the storage space in the flash memory cannot be efficiently used since an additional lookup table must be provided at every block.
Further, Korean Patent Laid-Open Publication No. 2001-0029171 entitled “Flash Memory and Method of Controlling the Same” discloses a technology for allowing data to be efficiently written and updated by using a unit provided in the flash memory. The Korean Patent Laid-Open Publication No. 2001-0029171 does not disclose data mapping based on a unit comprised of a predetermined block but a re-mapping method for accessing block data more efficiently.
Furthermore, Korean Patent Laid-Open Publication No. 2002-0028624, entitled “Remapping Control Method for Flash Memory and Flash Memory Structure for Use Therein”, discloses a technology for allowing the status of blocks and units to be written and processed while minimizing partial write. According to Korean Patent Laid-Open Publication No. 2002-0028624 mapping information between logical/physical block numbers written into a map block should be searched whenever a mapping relationship is changed due to delete, modify or a write operation, etc., by a host, in order to continuously update the mapping information about a corresponding block. Thus, since sufficient RAM capacity is required, the flash memory cannot be efficiently managed.